package com.beerq.util;

import android.content.Context;
import android.net.Uri;
import android.os.Environment;
import android.webkit.WebView;

import com.beerq.model.UserInfo;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

/**
 * 作者：minj on 2017/9/7 19:39
 * 存放一些公共的常量类
 */
public class Constants {
    public static String wx_appId="wx2f6b58bceb3735a8";
    private static IWXAPI wx_api; //全局的微信api对象
    public static String wx_appSecret="7e7cc8b62b7d44aced66d81e579d3640";

    public static String domain="http://h5.beerqi.com/";//web url
    public static String server_domain="http://api.beerqi.com/api/";//后端接口的地址

    public static String alipay_callback="http://api.beerqi.com/api/vip/AlipayCallBack";//支付宝回调接口



//    public static String domain="http://106.14.140.112:7011/";//web url
//    public static String server_domain="http://106.14.140.112:8089/api/";//后端接口的地址
//
//    public static String alipay_callback="http://106.14.140.112:8089/api/vip/AlipayCallBack";//支付宝回调接口

    public final static int CAMERA_APP = 100;
    public static final int GALLERY_APP = 101;
    public static final String ROOT_DIR = Environment.getExternalStorageDirectory().getPath();
    public static final String IMAGE_FOLDER_NAME = "beerq";
    public static Uri mCamRequestedUri;

    public static WebView firstWebView;

    public static UserInfo userInfo=null;

    public  static  IWXAPI getWXAPI(Context context){
        if(wx_api==null){
            wx_api= WXAPIFactory.createWXAPI(context.getApplicationContext(), Constants.wx_appId);
            wx_api.registerApp(Constants.wx_appId);
        }
        return wx_api;
    }

}
